package cn.tedu.sp12;

public class SingleObject1 {
//懒汉式
    private  static SingleObject1  instance;
    private SingleObject1(){};
    public static  synchronized SingleObject1 getInstance(){
        if (instance==null){
            instance=new SingleObject1();
        }
        return instance;
    }

}

